<%@page import="com.shsh.safemanage.dao.ProblemDao"%>
<%@page import="com.shsh.safemanage.model.Problem"%>
<%@page import="com.shsh.safemanage.model.Equipment"%>
<%@page import="java.util.List"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.dao.EquipmentDao"%>
<%@page import="com.shsh.safemanage.model.User"%>
<%@ page language="java" pageEncoding="UTF-8"%>

<%
{
String problemIDStr1 = request.getParameter(Constants.REQUEST_PARAMETER_ID);
Long problemID1 = 0L;
try {
	problemID1 = new Long(problemIDStr1);
} catch (Exception e) {
}

User loginUser = (User) session.getAttribute(Constants.SESSION_USER);
EquipmentDao equipmentDao1 = DaoCreator.createEquipmentDao();
ProblemDao problemDao1 = DaoCreator.createProblemDao();

Problem problem1 = problemDao1.getProblemByID(problemID1);
List<User> equipMappingUsers = equipmentDao1.getEquipmentMappingUser(problem1.getEquipmentID(), Constants.DEPARTMENT_TYPE_SHIYEBU);
%>
<span style="margin-left: 40px" class="span1">通知人：</span>
<%
StringBuffer equipLeadersStr = new StringBuffer();
for (int i = 0; i < equipMappingUsers.size(); i++) {
	if (i == 0) {
		equipLeadersStr.append(equipMappingUsers.get(i).getName());
	} else {
		equipLeadersStr.append(",");
		equipLeadersStr.append(equipMappingUsers.get(i).getName());
	}
}
%>
<input type="text" id="informedPerson" size="40" readonly="readonly"
	value="<%=equipLeadersStr%>" style="background-color: CCCCFF;" />
<%
}
%>
